package com.focusai.efairy.utils;

import android.text.TextUtils;

import com.focusai.efairy.utils.log.Log;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;

/**
 * 日期格式化类
 */

public class DateUtils {
    public static final String TAG = DateUtils.class.getName();
    public static final SimpleDateFormat YESTERDAY = new SimpleDateFormat("昨天 ", Locale.getDefault());
    public static final SimpleDateFormat EEEE = new SimpleDateFormat("EEEE", Locale.getDefault());
    public static final SimpleDateFormat MM_DD = new SimpleDateFormat("MM-dd", Locale.getDefault());
    public static final SimpleDateFormat YYYY = new SimpleDateFormat("yyyy年", Locale.getDefault());
    public static final SimpleDateFormat MM = new SimpleDateFormat("MM月", Locale.getDefault());
    public static final SimpleDateFormat HH_MM = new SimpleDateFormat("HH:mm", Locale.getDefault());
    public static final SimpleDateFormat HH_MM_SS = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM_DD = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM_DD_2 = new SimpleDateFormat("yyyy.MM.dd", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM = new SimpleDateFormat("yyyy年MM月", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM_DD_3 = new SimpleDateFormat("yyyy年MM月dd日", Locale.getDefault());
    public static final SimpleDateFormat YY_M_D_H_MM = new SimpleDateFormat("yy-M-d H:mm", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM_DD_HH_MM = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM_DD_HH_MM_SS = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM_DD_HH_MM_SS_1 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss", Locale.getDefault());
    public static final SimpleDateFormat YYYY_MM_DD_HH_MM_SS_SSS = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.getDefault());
    public static final SimpleDateFormat MM_DD_HH_MM = new SimpleDateFormat("MM-dd HH:mm", Locale.getDefault());

    public static final long ONE_SECOND = 1000;
    public static final long ONE_MINUTE = 60 * ONE_SECOND;
    public static final long ONE_HOUR = 60 * ONE_MINUTE;
    public static final long ONE_DAY = 24 * ONE_HOUR;
    public static final long ONE_WEEK = 7 * ONE_DAY;
    public static final long ONE_MONTH = 30 * ONE_DAY;
    private static final String EMPTY = "";

    private static Calendar calendar = Calendar.getInstance();

    public static int getYear(String dateStr) {
        Date date = new Date();
        try {
            date = YYYY_MM_DD.parse(dateStr);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        calendar.setTime(date);
        return calendar.get(Calendar.YEAR);
    }

    public static int getMonth(String dateStr) {
        Date date = new Date();
        try {
            date = YYYY_MM_DD.parse(dateStr);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        calendar.setTime(date);
        return calendar.get(Calendar.MONTH) + 1;
    }

    /**
     * 将 yyyy-MM-dd 转换为 yyyy年MM月
     *
     * @param dateStr
     * @return
     */
    public static String tranDateFormat(String dateStr) {
        Date date = new Date();
        try {
            date = YYYY_MM_DD.parse(dateStr);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return YYYY_MM.format(date);
    }

    public static String getFormatDateNormalTime(long time) {
        Date date = new Date(time);
        SimpleDateFormat sf = new SimpleDateFormat("MM-dd HH:mm", Locale.ENGLISH);
        String format = sf.format(date);
        Log.D("testw", "formatDate ========" + format);

        return format;
    }

    public static String tranDateFormat3(String dateStr) {
        Date date = new Date();
        try {
            date = YYYY_MM_DD.parse(dateStr);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return YYYY_MM_DD_3.format(date);
    }

    public static String getCurrentDate() {
        return YYYY_MM_DD_3.format(System.currentTimeMillis());
    }

    public static String getCurrentDateYMDHSS() {
        return YYYY_MM_DD_HH_MM_SS_SSS.format(System.currentTimeMillis());
    }

    public static String getCurrentDateStr() {
        return YYYY_MM_DD.format(System.currentTimeMillis());
    }

    public static String getMMDDHHMM(long time) {
        return MM_DD_HH_MM.format(time);
    }

    /**
     * 返回自定义格式的日期, 如: "yyyy-MM-dd hh:mm:ss", "yyyy-MM-dd HH:mm:ss",
     * "yyyy-MM-dd".
     *
     * @param date
     * @param style
     * @return
     * @throws ParseException
     */
    public static Date parseDateByStyle(String date, String style) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat(style, Locale.getDefault());
        // Added 2014年10月24日17:23:21
        sdf.setTimeZone(TimeZone.getTimeZone("GMT+8"));
        return sdf.parse(date);
    }

    public static String getSimpleCurrentDate() {
        return YYYY_MM_DD_2.format(System.currentTimeMillis());
    }

    public static String getSimpleCurrentDate2() {
        return YYYY_MM_DD_HH_MM_SS.format(System.currentTimeMillis());
    }

    public static String getSimpleCurrentDate3(long time) {
        return YYYY_MM_DD_HH_MM_SS.format(time);
    }

    public static int getLastDayOfCurrMonth() {
        Calendar cal = Calendar.getInstance();
        return getLastDayOfMonth(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1);
    }

    /**
     * 获取某年某月的最后一天
     * <p>
     * 如果是2017年4月  传入2017 4
     *
     * @param year  年
     * @param month 月
     * @return 30天
     */
    public static int getLastDayOfMonth(int year, int month) {
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.YEAR, year);
        cal.set(Calendar.DATE, 1);
        cal.set(Calendar.MONTH, month - 1);
        // 某年某月的最后一天
        return cal.getActualMaximum(Calendar.DATE);
    }

    public static String getCurrentDate(long timeMillis, String pattern) {
        SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.CHINA);
        return format.format((new Date(timeMillis)));
    }

    private static String dateFormat = "yyyy-MM-dd";

    public static String getMondayInWeek() {
        return getCurrentDate(getMondayInWeek(Calendar.getInstance()).getTimeInMillis(), dateFormat);
    }

    public static String getSundayInWeek() {
        return getCurrentDate(getSundayInWeek(Calendar.getInstance()).getTimeInMillis(), dateFormat);
    }

    public static String getFirstDayInMonth() {
        return getCurrentDate(getFirstDayInMonth(Calendar.getInstance()).getTimeInMillis(), dateFormat);
    }

    public static String getLastDayInMonth() {
        return getCurrentDate(getLastDayInMonth(Calendar.getInstance()).getTimeInMillis(), dateFormat);
    }

    public static String getFirstDayInYear() {
        return getCurrentDate(getFirstDayInYear(Calendar.getInstance()).getTimeInMillis(), dateFormat);
    }

    public static String getLastDayInYear() {
        return getCurrentDate(getLastDayInYear(Calendar.getInstance()).getTimeInMillis(), dateFormat);
    }


    /**
     * 获取当前日期所在周的第一天
     * 注意：这里返回的是星期一
     *
     * @param calendar
     * @return
     */
    public static Calendar getMondayInWeek(Calendar calendar) {
        int day_of_week = calendar.get(Calendar.DAY_OF_WEEK) - 1;
        if (day_of_week == 0)
            day_of_week = 7;
        calendar.add(Calendar.DATE, -day_of_week + 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar;
    }

    /**
     * 获取当前日期所在月的第一天
     *
     * @param calendar
     * @return
     */
    public static Calendar getFirstDayInMonth(Calendar calendar) {
        Calendar calendar1 = new GregorianCalendar();
        calendar1.setTime(calendar.getTime());
        calendar1.set(Calendar.DAY_OF_MONTH, 1);
        calendar1.set(Calendar.HOUR_OF_DAY, 0);
        calendar1.set(Calendar.MINUTE, 0);
        calendar1.set(Calendar.SECOND, 0);
        calendar1.set(Calendar.MILLISECOND, 0);
        return calendar1;
    }

    /**
     * 获取当前日期所在年的第一天
     *
     * @param calendar
     * @return
     */
    public static Calendar getFirstDayInYear(Calendar calendar) {
        Calendar calendar1 = new GregorianCalendar();
        calendar1.setTime(calendar.getTime());
        calendar1.set(Calendar.DAY_OF_YEAR, 1);
        calendar1.set(Calendar.HOUR_OF_DAY, 0);
        calendar1.set(Calendar.MINUTE, 0);
        calendar1.set(Calendar.SECOND, 0);
        calendar1.set(Calendar.MILLISECOND, 0);
        return calendar1;
    }

    /**
     * 获取当前日期所在周的最后一天
     *
     * @param calendar1
     * @return
     */
    public static Calendar getSundayInWeek(Calendar calendar1) {
        Calendar calendar = new GregorianCalendar();
        calendar.setTimeInMillis(getMondayInWeek(calendar1).getTimeInMillis());
        calendar.add(Calendar.DAY_OF_WEEK, 6);
        calendar.set(Calendar.HOUR_OF_DAY, 24);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, -1);
        return calendar;
    }


    /**
     * 获取当前日期所在月的最后一天
     *
     * @param calendar
     * @return
     */
    public static Calendar getLastDayInMonth(Calendar calendar) {
        Calendar calendar1 = new GregorianCalendar();
        calendar1.setTime(calendar.getTime());
        calendar1.set(Calendar.DAY_OF_MONTH, calendar1.getActualMaximum(Calendar.DAY_OF_MONTH));
        calendar1.set(Calendar.HOUR_OF_DAY, 24);
        calendar1.set(Calendar.MINUTE, 0);
        calendar1.set(Calendar.SECOND, 0);
        calendar1.set(Calendar.MILLISECOND, -1);
        return calendar1;
    }

    /**
     * 获取当前日期所在年的最后一天
     *
     * @param calendar1
     * @return
     */
    public static Calendar getLastDayInYear(Calendar calendar1) {
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(calendar1.getTime());
        calendar.set(calendar.get(Calendar.YEAR), 11, 31);
        calendar.set(Calendar.HOUR_OF_DAY, 24);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, -1);
        return calendar;
    }

    /**
     * 根据index获取近7天的日期
     *
     * @param index
     * @return
     */
    public static String getLast7Date(int index) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(System.currentTimeMillis());
        calendar.add(Calendar.DAY_OF_MONTH, index - 7);
        int date = calendar.get(Calendar.DAY_OF_MONTH);
        return String.valueOf(date);
    }

    /**
     * 根据index获取近12个月的月份
     *
     * @param index
     * @return
     */
    public static String getLast12Month(int index) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(System.currentTimeMillis());
        calendar.add(Calendar.MONTH, index - 12);
        int date = calendar.get(Calendar.MONTH) + 1;
        return String.valueOf(date);
    }

    /**
     * 系统默认的日期格式: "yyyyMMddHHmmss"
     *
     * @param date
     * @return
     */
    public static String defaultFormat4(Date date) {
        return customFormatByStyle(date, "yyyyMMddHHmmssSSS");
    }

    /**
     * 返回自定义格式的日期, 如: "yyyy-MM-dd hh:mm:ss", "yyyy-MM-dd HH:mm:ss",
     * "yyyy-MM-dd".
     *
     * @param style
     * @return
     */
    public static String getCurrentDateByStyle(String style) {
        SimpleDateFormat sdf = new SimpleDateFormat(style, Locale.getDefault());

        return sdf.format(new Date());
    }


    /**
     * 返回日期
     *
     * @return
     */
    public static String toString(long millisecond) {
        return customFormatByStyle(new Date(millisecond), "yyyy-MM-dd HH:mm:ss.SSS");
    }

    /**
     * 自定义的日期格式
     *
     * @param date
     * @param style
     * @return
     */
    public static String customFormatByStyle(Date date, String style) {
        if (date == null || TextUtils.isEmpty(style)) {
            return "";
        }

        return new SimpleDateFormat(style, Locale.getDefault()).format(date);
    }

    /**
     * @param time yyyy-MM-dd HH:mm:ss
     */
    public static String parseToFormatDate(String time) {
        if (TextUtils.isEmpty(time)) {
            return EMPTY;
        }

        try {
            Date date = YYYY_MM_DD_HH_MM_SS.parse(time);
            return getFormatDatePattern(date.getTime());
        } catch (Exception e) {
            return EMPTY;
        }
    }

    public static String getFormatDatePattern(long time) {
        SimpleDateFormat sdf = getDatePattern(time);
        return sdf.format(time);
    }

    private static SimpleDateFormat getDatePattern(long time) {
        Calendar calendar = Calendar.getInstance();
        long todaybegin = getTodayBegin(calendar);
        long yearbegin = getYearBegin(calendar);

        if (time >= todaybegin && time < todaybegin + ONE_DAY) {
            return HH_MM;
        } else if (time >= todaybegin - ONE_DAY) {
            return YESTERDAY;
        } else if (time >= todaybegin - (6) * ONE_DAY) {
            return EEEE;
        } else if (time >= yearbegin) {
            return MM_DD;
        } else {
            return YYYY_MM_DD;
        }
    }

    private static long getTodayBegin(Calendar calendar) {
        return new GregorianCalendar(
                calendar.get(Calendar.YEAR),
                calendar.get(Calendar.MONTH),
                calendar.get(Calendar.DATE)).getTimeInMillis();
    }

    private static long getYearBegin(Calendar calendar) {
        return new GregorianCalendar(calendar.get(Calendar.YEAR), 0, 1, 0, 0).getTimeInMillis();
    }

    /**
     * 返回自定义格"yyyy-MM-dd HH:mm:ss.SSS"的日期.
     *
     * @param date
     * @return
     */
    public static Date parseDate(String date) {
        try {
            return YYYY_MM_DD_HH_MM_SS.parse(date);
        } catch (ParseException e) {
            e.printStackTrace();
            return null;
        }
    }

    /**
     * 返回自定义格式"yyyy-MM-dd"的日期
     *
     * @param date
     * @return
     * @throws ParseException
     */
    public static Date parseDefaultDate(String date) {
        if (TextUtils.isEmpty(date)) {
            return null;
        }
        try {
            return parseDateByStyle(date, "yyyy-MM-dd");
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }

    /**
     * 当前季度的开始时间，即2012-01-1 00:00:00
     *
     * @return
     */
    public static Calendar getSeasonStartCalendar(Calendar c) {
        int currentMonth = c.get(Calendar.MONTH) + 1;
        try {
            if (currentMonth >= 1 && currentMonth <= 3)
                c.set(Calendar.MONTH, 0);
            else if (currentMonth >= 4 && currentMonth <= 6)
                c.set(Calendar.MONTH, 3);
            else if (currentMonth >= 7 && currentMonth <= 9)
                c.set(Calendar.MONTH, 6);
            else if (currentMonth >= 10 && currentMonth <= 12)
                c.set(Calendar.MONTH, 9);
            c.set(Calendar.DATE, 1);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return c;
    }

    /**
     * 当前季度的结束时间，即2012-03-31 23:59:59
     *
     * @return
     */
    public static Calendar getSeasonEndCalendar(Calendar c) {
        int currentMonth = c.get(Calendar.MONTH) + 1;
        try {
            if (currentMonth >= 1 && currentMonth <= 3) {
                c.set(Calendar.MONTH, 2);
                c.set(Calendar.DATE, 31);
            } else if (currentMonth >= 4 && currentMonth <= 6) {
                c.set(Calendar.MONTH, 5);
                c.set(Calendar.DATE, 30);
            } else if (currentMonth >= 7 && currentMonth <= 9) {
                c.set(Calendar.MONTH, 8);
                c.set(Calendar.DATE, 30);
            } else if (currentMonth >= 10 && currentMonth <= 12) {
                c.set(Calendar.MONTH, 11);
                c.set(Calendar.DATE, 31);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return c;
    }

    /**
     * 按精确到毫秒返回Calendar实例
     *
     * @param millisecond
     * @return
     * @throws ParseException
     */
    public static Calendar parseCalendar(long millisecond) throws ParseException {
        Calendar c = Calendar.getInstance();
        c.setTimeInMillis(millisecond);
        return c;
    }

    /**
     * 系统默认的日期格式: "yyyy-MM-dd"
     *
     * @param date
     * @return
     */
    public static String defaultFormat(Date date) {
        if (date == null) {
            return "";
        }

        return customFormatByStyle(date, "yyyy-MM-dd");
    }

    /**
     * 从指定类型倒退指定周期
     *
     * @param field   DAY_OF_YEAR,WEEK_OF_YEAR,MONTH,YEAR
     * @param from
     * @param howMany
     * @return
     */
    public static Calendar getLastDayBeforField(int field, Calendar from, int howMany) {
        from.add(field, -howMany);

        Log.D(TAG, "getLastDayOfMonth: " + defaultFormat(from.getTime()));
        Log.D(TAG, "getLastDayOfMonth: " + from.getTime());
        return from;
    }

    /**
     * 从指定类型向后指定周期
     *
     * @param field   DAY_OF_YEAR,WEEK_OF_YEAR,MONTH,YEAR
     * @param from
     * @param howMany
     * @return
     */
    public static Calendar getLastDayAfterField(int field, Calendar from, int howMany) {
        from.add(field, howMany);

        Log.D(TAG, "getLastDayOfMonth: " + defaultFormat(from.getTime()));
        Log.D(TAG, "getLastDayOfMonth: " + from.getTime());
        return from;
    }

    /**
     * 返回季度的第一天
     *
     * @return
     */
    public static long getFirstDayOfSeason() {
        Calendar calendar = new GregorianCalendar();
        int month = getQuarterInMonth(calendar.get(Calendar.MONTH), true);
        calendar.set(Calendar.MONTH, month);
        calendar.set(Calendar.DAY_OF_MONTH, 1);

        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);

        Log.D(TAG, "getFirstDayOfSeason: " + calendar.getTime());
        return calendar.getTimeInMillis();
    }

    public static Calendar getFirstDayBySeason(Calendar c) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(c.getTime());
        int month = getQuarterInMonth(calendar.get(Calendar.MONTH), true);
        calendar.set(Calendar.MONTH, month);
        calendar.set(Calendar.DAY_OF_MONTH, 1);

        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);

        Log.D(TAG, "getFirstDayOfSeason: " + calendar.getTime());
        return calendar;
    }

    /**
     * 返回季度的最后一天
     *
     * @return
     */
    public static long getLastDayOfSeason() {
        Calendar calendar = new GregorianCalendar();
        int month = getQuarterInMonth(calendar.get(Calendar.MONTH), false);
        calendar.set(Calendar.MONTH, month + 1);
        calendar.set(Calendar.DAY_OF_MONTH, 0);

        calendar.set(Calendar.HOUR_OF_DAY, 24);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, -1);

        Log.D(TAG, "getLastDayOfSeason: " + calendar.getTime());
        return calendar.getTimeInMillis();
    }

    public static Calendar getLastDayBySeason(Calendar c) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(c.getTime());
        int month = getQuarterInMonth(calendar.get(Calendar.MONTH), false);
        calendar.set(Calendar.MONTH, month + 1);
        calendar.set(Calendar.DAY_OF_MONTH, 0);

        calendar.set(Calendar.HOUR_OF_DAY, 24);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, -1);

        Log.D(TAG, "getLastDayOfSeason: " + calendar.getTime());
        return calendar;
    }


    /**
     * 返回当前年的第一天
     *
     * @return
     */
    public static long getFirstDayOfYear() {
        Calendar calendar = new GregorianCalendar();
        calendar.set(Calendar.DAY_OF_YEAR, 1);

        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);

        Log.D(TAG, "getFirstDayOfYear: " + calendar.getTime());
        return calendar.getTimeInMillis();
    }

    /**
     * 返回当前年的最后一天
     *
     * @return
     */
    public static long getLastDayOfYear() {
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(new Date());
        calendar.set(calendar.get(Calendar.YEAR), 11, 31);

        calendar.set(Calendar.HOUR_OF_DAY, 24);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, -1);

        Log.D(TAG, "getLastDayOfYear: " + calendar.getTime());

        return calendar.getTimeInMillis();
    }

    /**
     * 返回第几个月份，不是几月. 季度一年四季， 第一季度：1月-3月， 第二季度：4月-6月， 第三季度：7月-9月， 第四季度：10月-12月
     */
    private static int getQuarterInMonth(int month, boolean isQuarterStart) {

        if (month >= Calendar.APRIL && month <= Calendar.JUNE) {
            if (isQuarterStart) {
                return Calendar.APRIL;
            } else {
                return Calendar.JUNE;
            }
        } else if (month >= Calendar.JULY && month <= Calendar.SEPTEMBER) {
            if (isQuarterStart) {
                return Calendar.JULY;
            } else {
                return Calendar.SEPTEMBER;
            }
        } else if (month >= Calendar.OCTOBER && month <= Calendar.DECEMBER) {
            if (isQuarterStart) {
                return Calendar.OCTOBER;
            } else {
                return Calendar.DECEMBER;
            }
        } else {
            if (isQuarterStart) {
                return Calendar.JANUARY;
            } else {
                return Calendar.MARCH;
            }
        }
    }

    /**
     * 计算某一月有几天
     */
    public static int getcurMonthDayOfYear(long times) {
        try {
            Calendar calendar = DateUtils.parseCalendar(times);
            return calendar.DAY_OF_MONTH;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return 30;
    }
}
